package com.ofhb.webapp.client.ui.navbar.events;

import com.google.gwt.event.shared.GwtEvent;

public class NavChangeEvent extends GwtEvent<NavChangeEventHandler> {

	private int selectedIndex;
	
	public static Type<NavChangeEventHandler> TYPE = new Type<NavChangeEventHandler>();
	
	public NavChangeEvent(int selectedIndex) {
		this.selectedIndex = selectedIndex;
	}
	
	@Override
	public Type<NavChangeEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(NavChangeEventHandler handler) {
		handler.onNavChangeEvent(this);
	}

	public int getSelectedIndex() {
		return selectedIndex;
	}

	public void setSelectedIndex(int selectedIndex) {
		this.selectedIndex = selectedIndex;
	}

}
